package com.litorg.demo.db.producer;

import javax.annotation.Resource;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

@Component
public class MsgProducer {
    @Resource
    private RabbitTemplate rabbitTemplate;
 
    public void send(String exchangeName, String routingKey, Object msg) {
        rabbitTemplate.convertAndSend(exchangeName, routingKey, msg);
    }
}